home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / misc_src / qcard2 / global.bas < prev    next >
BASIC Source File  |  1995-11-01  |  5KB  |  74 lines

  1. ' Some useful constants
  2. Global Const FACEDOWN = 0
  3. Global Const FACEUP = 1
  4. Global Const CARDWIDTH = 71
  5. Global Const CARDHEIGHT = 96
  6. Global Const OFFSET = 16
  7.  
  8.  
  9. ' Required in Form Load to use dll
  10. Declare Function InitializeDeck Lib "qcard.dll" (ByVal hWnd As Integer) As Integer
  11. ' Reset all card values to defaults
  12. Declare Sub SetDefaultValues Lib "qcard.dll" ()
  13. ' Set the currently used card back design for cards 105 to 109
  14. Declare Sub SetCurrentBack Lib "qcard.dll" (ByVal nIndex As Integer)
  15.  
  16. ' Card drawing subs
  17. Declare Sub DrawSymbol Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nValue As Integer, ByVal x As Integer, ByVal y As Integer)
  18. Declare Sub DrawCard Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer, ByVal x As Integer, ByVal y As Integer)
  19. Declare Sub DrawBack Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nValue As Integer, ByVal x As Integer, ByVal y As Integer)
  20. Declare Sub DealCard Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer, ByVal x As Integer, ByVal y As Integer)
  21. Declare Sub RemoveCard Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer)
  22.  
  23. ' Get card information functions
  24. Declare Function GetCardColor Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  25. Declare Function GetCardSuit Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  26. Declare Function GetCardValue Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  27. Declare Function GetCardStatus Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  28. Declare Function GetCardBlocked Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  29. Declare Function IsCardDisabled Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  30. Declare Function GetCardX Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  31. Declare Function GetCardY Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  32. Declare Function GetUser1 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  33. Declare Function GetUser2 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  34. Declare Function GetUser3 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  35. Declare Function GetUser4 Lib "qcard.dll" (ByVal nCard As Integer) As Integer
  36.  
  37. ' Set card information subs
  38. Declare Sub SetCardStatus Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  39. Declare Sub AdjustCardBlocked Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  40. Declare Sub SetCardDisabled Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  41. Declare Sub SetCardX Lib "qcard.dll" (ByVal nCard As Integer, ByVal x As Integer)
  42. Declare Sub SetCardY Lib "qcard.dll" (ByVal nCard As Integer, ByVal y As Integer)
  43. Declare Sub SetUser1 Lib "qcard.dll" (ByVal nCard As Integer, ByVal bValue As Integer)
  44. Declare Sub SetUser2 Lib "qcard.dll" (ByVal nCard As Integer, ByVal nValue As Integer)
  45. Declare Sub SetUser3 Lib "qcard.dll" (ByVal nCard As Integer, ByVal nValue As Integer)
  46. Declare Sub SetUser4 Lib "qcard.dll" (ByVal nCard As Integer, ByVal nValue As Integer)
  47. Declare Sub SetOffSet Lib "qcard.dll" (ByVal nValue As Integer)
  48.  
  49. ' Dragging subs and functions
  50. Declare Function InitDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  51. Declare Sub AbortDrag Lib "qcard.dll" ()
  52. Declare Sub DoDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer)
  53. Declare Function EndDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  54. Declare Sub ReturnDrag Lib "qcard.dll" (ByVal hWnd As Integer, ByVal nCard As Integer, ByVal nOldX As Integer, ByVal nOldY As Integer)
  55. Declare Sub BlockDrag Lib "qcard.dll" (ByVal hWnd As Integer, nFirst As Integer, ByVal nNumCards As Integer, ByVal x As Integer, ByVal y As Integer)
  56. Declare Function EndBlockDrag Lib "qcard.dll" (ByVal hWnd As Integer, nFirst As Integer, ByVal nNumCards As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  57. Declare Sub ReturnBlockDrag Lib "qcard.dll" (ByVal hWnd As Integer, nFirst As Integer, ByVal nNumCards As Integer, ByVal x As Integer, ByVal y As Integer)
  58. Declare Function GetFreeDestination Lib "qcard.dll" (ByVal nSource As Integer) As Integer
  59.  
  60. ' Undocumented functions, generally not used
  61.  
  62. ' returns the number of any unblocked card which lies beneath the mouse coordinates x, y
  63. Declare Function PointInFreeCard Lib "qcard.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
  64.  
  65. ' returns the number of any card whose top 16 (or OffSet) pixels lie beneath the mouse coordinates x, y
  66. Declare Function PointInCardTop Lib "qcard.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
  67.  
  68. ' manually sets the active drag card for a subsequent DoDrag or BlockDrag call
  69. Declare Sub SetActiveCard Lib "qcard.dll" (ByVal nCard As Integer)
  70.  
  71.  
  72.  
  73.  
  74.